//
//  ASCollectionMianVC.m
//  AvatarShow
//
//  Created by xunruiIOS on 2021/5/6.
//

#import "ASCollectionMianVC.h"
#import "ASCollectionListSubVC.h"

@interface ASCollectionMianVC ()

@end

@implementation ASCollectionMianVC

- (void)dealloc{
    FELog(@"ASCollectionMianVC释放");
}

- (void)viewDidLoad {
    [super viewDidLoad];
    [self crateParam];

    // Do any additional setup after loading the view.
}

- (void)crateParam{
    @weakify(self);
    WMZPageParam *param = PageParam()
    .wTitleArrSet(@[@"头像",@"表情"])
    .wMenuIndicatorColorSet([UIColor colorWithHexString:@"#FF7785"])            ///指示器颜色
    .wMenuTitleSelectColorSet([UIColor colorWithHexString:@"#FF7785"])
    .wMenuTitleColorSet([UIColor colorWithHexString:@"#666666"])
    .wMenuTitleUIFontSet([UIFont systemFontOfSize:16])
    .wMenuTitleSelectUIFontSet([UIFont systemFontOfSize:16])
    .wMenuWidthSet(SCREEN_WIDTH - 100)
    .wMenuPositionSet(PageMenuPositionCenter)
    .wMenuTitleWidthSet((SCREEN_WIDTH - 100)/2)
    .wMenuHeightSet(54)
    .wMenuIndicatorYSet(14)   ///下划线距离按钮的y值
    .wMenuIndicatorRadioSet(1.5)///下划线圆角
    .wMenuIndicatorHeightSet(3)///下划线高度
    .wMenuIndicatorWidthSet(25) ///下划线宽度
    .wViewControllerSet(^UIViewController *(NSInteger index) {
        @strongify(self);
        ASCollectionListSubVC *vc = [ASCollectionListSubVC new];
        vc.index = index;
        vc.type = self.type;
        return vc;
    })
    //typedef void (^PageClickBlock)(id anyID,NSInteger index);

    .wEventClickSet(^(id anyID, NSInteger index){
        @strongify(self);
        NSString *str = @"我的收藏";
        NSString *subStr = @"头像";
        if (self.type == 1) {
            str = @"我的下载";
        }
        if (index == 1) {
            subStr = @"表情";
        }
        NSString *mainStr = [NSString stringWithFormat:@"%@_%@",str,subStr];
        [ASTool addUMTongJiKey:@"user_center" subKey:@"my" titleStr:mainStr];
    })
    .wMenuAnimalSet(PageTitleMenuAiQY);
    self.param = param;
}
/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
